<html>
<head><meta charset="utf-8"><title>Vec extend with alloc::grow_zeroed · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20extend.20with.20alloc.3A.3Agrow_zeroed.html">Vec extend with alloc::grow_zeroed</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248413758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Vec%20extend%20with%20alloc%3A%3Agrow_zeroed/near/248413758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Vec.20extend.20with.20alloc.3A.3Agrow_zeroed.html#248413758">(Aug 04 2021 at 21:53)</a>:</h4>
<p>While chasing a max-rss regression I noticed that <code>let v: Vec&lt;u8&gt; = Vec::new(); v.resize(len, 0)</code> doesn't use <code>alloc::grow_zeroed</code>. Any reason that hasn't been done except that it would need quite a bit of new plumbing?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>